from cc_flask.admin import CModelView, init_models, admin
from app import models
from flask import current_app


class UserAdmin(CModelView):
    column_searchable_list = ['username']
    column_filters = ['username']
    # form_ajax_refs = [] 异步加载外键，外键较多的时候使用


# admin.add_view(UserAdmin(models.User, db))